package com.yjb.auth.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yjb.auth.entity.UserRoleRel;
import com.yjb.auth.mapper.UserRoleRelMapper;
import com.yjb.auth.service.UserRoleRelService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserRoleRelServiceImpl extends ServiceImpl<UserRoleRelMapper, UserRoleRel> implements UserRoleRelService {

    @Override
    public List<UserRoleRel> listByUserId(Integer userId) {
        return list(Wrappers.<UserRoleRel>query().lambda().eq(UserRoleRel::getUserId, userId));
    }
}
